(function () {
    "use strict";

    var students = [{
        firstName: 'Петър',
        lastName: 'Петров'
    }, {
        firstName: 'Иван',
        lastName: 'Иванов'
    }, {
        firstName: 'Петър',
        lastName: 'Иванов'
    }, {
        firstName: 'Иван',
        lastName: 'Петров'
    }, {
        firstName: 'Георги',
        lastName: 'Раковски'
    }, {
        firstName: 'Петър',
        lastName: 'Раковски'
    }, {
        firstName: 'Симеон',
        lastName: 'Раковски'
    }];

    var firstNames =
        _.pluck(students, 'firstName');

    var mostCommonFirstName =
        _.chain(firstNames)
            .countBy()
            .pairs()
            .max(_.last)
            .head()
            .value();

    var lastNames =
        _.pluck(students, 'lastName');

    var mostCommonLastName =
        _.chain(lastNames)
            .countBy()
            .pairs()
            .max(_.last)
            .head()
            .value();

    console.log(mostCommonFirstName);
    console.log(mostCommonLastName);
}());